<?php

class Reports extends CI_Controller {

  function __construct()
  {
	parent::__construct();
    $this->load->library('table');
  }
  public function activities()
  {
	$query = $this->db->query("SELECT * FROM sales");
	$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );
    $this->table->set_template($tmpl); 
	echo $this->table->generate($query); 
  }
  public function salesreport()
  {
	$query = $this->db->query("SELECT * FROM tickets");
	$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );
    $this->table->set_template($tmpl); 
	echo $this->table->generate($query); 
  }
}